using System.Collections;
using UnityEngine;

public class EnemyBullet4 : IEnemyBullet
{
    public EnemyBullet4(GameObject obj) : base(obj)
    {
        type = EnemyBulletType.EnemyBullet4;
    }
    
    public override void OnEnter()
    {
        base.OnEnter();
        CoroutinePool.Instance.StartCoroutine(WaitForDestroy(), this);
    }
    
    private IEnumerator WaitForDestroy()
    {
        yield return new WaitForSeconds(3f);
        Remove();
    }
    
    protected override void OnExit()
    {
        base.OnExit();
        CoroutinePool.Instance.StopAllCoroutineInObject(this);
    }
}
